<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网站后台管理系统</title>
<style type="text/css">
</style>
<script type="text/javascript" src="/manage/js/jquery-1.4.2.min.js"></script>
<script src="/manage/js/Images.js" type="text/javascript"></script>
<script src="/manage/js/ckeditor/ckeditor.js"></script>
<script src="/manage/js/ckfinder/ckfinder.js"></script>
<!--[if IE 6]>
<script type="text/javascript" src="/manage/js/DD_belatedPNG.js" ></script>
<script type="text/javascript">
DD_belatedPNG.fix('.logo,.top .right a,.modify a.password,.modify a.edit');
</script>
<![endif]-->
<link href="/manage/css/admin.css" rel="stylesheet" type="text/css" />
<title></title>
<script>
$(document).ready(function(){
	$('a[confirm]').click(function(){
		return confirm( $(this).attr('confirm') ) ;
	});

	$(document).keydown(function(evt){
	if(evt.keyCode==116) {
		evt.keyCode = 0;
        evt.cancelBubble = true;
		//document.getElementById('mainpage').contentWindow.location.reload(true);
		//$('#mainpage').attr('src' ,url );
		self.location.reload(true);
		return false;
	}

	return true ;
	});

	$('.img_select').click(function(){
		var srcInput = $(this).prev('input[id]').attr('id');
		var finder = new CKFinder() ;
		finder.basePath = '/manage/js/ckfinder/'; //导入CKFinder的路径
		finder.selectActionFunction = setFileUrl;
		finder.selectActionData = srcInput; //接收地址的input ID
		finder.popup() ;
	});
	function setFileUrl(url, data) {
		$('#'+data["selectActionData"]).val(url);
	}
	$('form').submit(function(){
	    var defa = '不能为空';
	    var must = $('.must');
	    var is_sub = true;
	    must.each(function(){
	        var p = $(this).parent().parent();
    	    var val = p.find('input').val();
    	    if(val == null || val.length == 0){
    	        val = p.find('select').val();
    	    }
    	    if(val == null || val.length == 0){
    	        val = p.find('textarea').html();
    	    }
    	    if(!val || val == null || val == '' || val.length ==0) {
    	        alert($(this).parent().text() + defa);
    	        is_sub = false;
    	    }
	    });
	    return is_sub;
	});

});
</script>
</head>
<body>